///\file depmodel.cpp
///\author Allan BLANCHARD
///\brief Définition des méthodes de DepModel
#include "depmodel.hh"

DepModel::DepModel(const char* name, bool transparent) : 
  Model(name, transparent), father(0){}

void DepModel::draw() const{
  glPushMatrix();
  applyTransformations();
  
  Model::draw();
  glPopMatrix();
}

void DepModel::applyTransformations() const{
  if(father)
    father->applyTransformations();

  for(unsigned int i(0); i < transformations.size(); i++)
    transformations[i]->apply();
}
